<?php if(is_object($parent)): ?>
<p>
	&lt; <a href="<?php echo $parent->url ?>">Back to <?php echo $parent->name ?></a>
</p>
<?php endif; ?>


<div class="pgallery">
<?php
$size = $settings['size_small'];
foreach($items as $item){
	$image = $item->paths['small'];
	$url = ($item->type == 'cat') ? $item->url : $item->paths['medium'];
	?>
	<div class="pgallery_entry pg_<?php echo $item->type ?>">
		<a href="<?php echo $url ?>" rel="group" class="fb_<?php echo $item->type ?>" title="<?php echo $item->description ?>">
			<img src="<?php echo $image ?>" width="<?php echo $size ?>" height="<?php echo $size ?>" alt="<?php echo $item->name ?>" /></a>
			<span><?php echo $item->name ?></span>
		</a>
	</div>
	<?php
}
?>
</div>

<script type="text/javascript">
$(document).ready(function() {
	$("a.fb_image").fancybox({'overlayShow':false});
});
</script>